package dfl.bysj.entity;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author DFL
 * @since 2022-04-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="User对象", description="")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
     private Integer id;

    private String nickname;

    private String username;

    private String password;

    private String gender;

    private String portrait;

    private String background;

    private String phoneNumber;

    private String openId;

    public User(String nickname, String gender, String portrait, String openId,String wxUnionId) {
        this.nickname = nickname;
        this.gender = gender;
        this.portrait = portrait;
        this.openId = openId;
        this.wxUnionId=wxUnionId;
    }

    /**
     * 绑定网站，app之类需要用到联合id
     */
    private String wxUnionId;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


    public User() {

    }
}
